<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
</head>

<body>
    <div class="container">
        <p>下拉菜单</p>
        <div class="dropdown dropend">
            <p>下拉菜单</p>
            <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">下拉菜单</button>
            <ul class="dropdown-menu">
                <li>
                    <h5 class="dropdown-header">标题</h5>
                </li>
                <li><a href="#" class="dropdown-item">1</a></li>
                <li><a href="#" class="dropdown-item">2</a></li>
                <li><a href="#" class="dropdown-item">3</a></li>
                <li><a href="#" class="dropdown-item active">激活项</a></li>
                <li><a href="#" class="dropdown-item disabled">禁用项</a></li>
                <li>
                    <hr class="dropdown-divider">下划线
                </li>
                <li><a href="#" class="dropdown-item">4</a></li>
            </ul>
        </div>

        <div class="dropstart text-end">
            菜单弹出方向-左侧<button type="button" class="btn btn-info dropdown-toggle"
                data-bs-toggle="dropdown">下拉菜单-右对齐</button>
            <ul class="dropdown-menu">
                <li><a href="#" class="dropdown-item">1</a></li>
                <li><a href="#" class="dropdown-item">2</a></li>
                <li><a href="#" class="dropdown-item">3</a></li>
            </ul>
        </div>

        <p>下拉菜单弹出方向：默认下方</p>
        <div class="dropdown">
            <button type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown">默认下拉菜单</button>
            <ul class="dropdown-menu">
                <li><a href="#" class="dropdown-item">1</a></li>
                <li><a href="#" class="dropdown-item">2</a></li>
                <li><a href="#" class="dropdown-item">3</a></li>
            </ul>
        </div>

        <p>设置下拉菜单弹出方向：下方</p>
        <div class="dropdown dropdown-menu-end">
            <button type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown">默认下拉菜单</button>
            <ul class="dropdown-menu">
                <li><a href="#" class="dropdown-item">1</a></li>
                <li><a href="#" class="dropdown-item">2</a></li>
                <li><a href="#" class="dropdown-text">链接</a></li>
                <li><span class="dropdown-text">下拉菜单文本</span></li>
            </ul>
        </div>
        <p>下拉菜单弹出方向：上方</p>
        <div class="dropup">
            <button type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown">下拉菜单-上方</button>
            <ul class="dropdown-menu">
                <li><a href="#" class="dropdown-item">1</a></li>
                <li><a href="#" class="dropdown-item">2</a></li>
                <li><a href="#" class="dropdown-item">3</a></li>
            </ul>
        </div>
        <p>按钮组设置下拉菜单</p>
        <div class="btn-group ">
            <button type="button" class="btn btn-primary">Main</button>
            <button type="button" class="btn btn-primary">Work</button>
            <div class="btn-group">
                <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">Study</button>
                <ul class="dropdown-menu">
                    <li><a href="#" class="dropdown-item">English</a></li>
                    <li><a href="#" class="dropdown-item">Math</a></li>
                </ul>
            </div>

        </div>

        <div class="d-flex gap-5 justify-content-center">
            <!-- <ul class="dropdown-menu  mx-0 shadow" style="width: 220px;">
                <li><a href="#" class="dropdown-item d-flex gap-2 align-items-center">1</a></li>
                <li><a href="#" class="dropdown-item d-flex gap-2 align-items-center">2</a></li>
                <li><a href="#" class="dropdown-item d-flex gap-2 align-items-center">3</a></li>
            </ul> -->
            <ul class="list-group">
                <li class="list-group-item">Apple</li>
                <li class="list-group-item">Orange</li>
                <li class="list-group-item">Purple</li>
                <li class="list-group-item list-group-item-info">Other</li>
            </ul>

        </div>

        <h2 class="mt-5 p-5 bg-info text-white">折叠</h2>
        <button type="button" class="btn btn-primary" data-bs-toggle="collapse"
            data-bs-target="#toggleInfo">简单折叠</button>
        <div id="toggleInfo" class="collapse">
            这是一段折叠的文本
        </div>
        <p> </p>
        <a href="#toggleInfo2" class="btn btn-primary" data-bs-toggle="collapse">链接按钮</a>
        <div id="toggleInfo2" class="collapse">
            这是一段折叠的文本
        </div>

        <p></p>
        <a href="#toggleInfo3" class="btn btn-primary" data-bs-toggle="collapse">默认显示的折叠按钮</a>
        <div id="toggleInfo3" class="collapse show">
            这是一段折叠的文本
        </div>

        <p>手风琴效果，设置parent</p>
        <div id="collapseParent">
            <div class="card">
                <div class="card-header">
                    <a class="btn " href="#col1" data-bs-toggle="collapse">姓名</a>
                    <div id="col1" class="collapse" data-bs-parent="#collapseParent">
                        <div class="card-body">张三</div>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <a class="btn " href="#col2" data-bs-toggle="collapse">年龄</a>
                    <div id="col2" class="collapse" data-bs-parent="#collapseParent">
                        <div class="card-body">18</div>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <a class="btn " href="#col3" data-bs-toggle="collapse">所学专业</a>
                    <div id="col3" class="collapse" data-bs-parent="#collapseParent">
                        <div class="card-body">汉语言</div>
                    </div>
                </div>
            </div>
        </div>
        <br>
        <br>
        <br>
        <div>页脚</div>
    </div>
</body>

</html>